Enable sc:compile for stdlib package scala.jdk#25870
Conversation
| * assert(intAcc.nonEmpty) | ||
| * assert(anyAcc.nonEmpty) | ||
| * assert(intAcc2.nonEmpty) | ||
| * assert(anyAcc2.nonEmpty) |
There was a problem hiding this comment.
the assert(foo.nonEmpty) thing (here and elsewhere) feels odd and undesirable to me — this is a case where the non-REPL-style version has lost information that existed in the original REPL-style version
in any particular example, I think a decision needs to be made whether showing or checking the result is important, or unimportant. if it's unimportant enough, the asserts can be omitted. if it's actually important, some other way to demonstrate the behavior is needed, whether it's a comment showing the result, or a more powerful assert, or whatever
| * import scala.jdk.CollectionConverters._ | ||
| * val s: java.util.Set[String] = Set("one", "two").asJava | ||
| * ```scala sc:compile | ||
| * import scala.jdk.CollectionConverters._ |
There was a problem hiding this comment.
please use Scala style 3 wildcard imports (foo.*) everywhere rather than Scala 2 style (foo._)
d0fcc8f to
eec7ed6
Compare
eec7ed6 to
2c50192
Compare
|
@SethTisue Do you mind to review again to see if it is fit enough for merging? Thanks. |
Added sc:compile to classes under scala.jdk package.